<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="pragma" content="no-cache" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="expires" content="0" />
    <div th:insert ="/demo/include/base::commHead"></div>
    <title>填写融资申请</title>
    <style>
        .form{}
        .form .error{ color: #f30; margin-left: 20px; display: none;}
        .form .tips{margin-left: 5px;}
    </style>

    <style>
        .type_0 .type_0{ display: block !important;}
        .type_0 tr.type_0{ display: grid !important;}

        .type_1 .type_1{ display: block !important;}
        .type_1 tr.type_1{ display: grid !important;}
    </style>
        <script type="text/javascript" th:src="@{/common/uploader/uploader.js}"></script>
        <link th:href="@{/common/uploader/uploader.css}" rel="stylesheet" type="text/css">
</head>
<body class="ht">
<div th:insert="base::loading"></div>
<div class="tabTitle"><span><i class="mdi mdi-menu-up"></i>申请融资</span></div>
<div class="content-wrapper">
    <div class="breadCrumb">
        <i class="mdi mdi-map-marker"></i>
        <span>lucky业务系统<i class="mdi mdi-chevron-double-right"></i>融资服务<i class="mdi mdi-chevron-double-right"></i>我要融资</span>
    </div>
    <form name="form" id="form1" method="post">

        <div class="module">
        <table cellpadding="0" cellspacing="0" class="vTable">
            <tbody>
            <tr>
                <th class="label">类型（字段切换展示）</th>
                <td>
                    <p>
                        <select name="type">
                            <option value="9">请选择</option>
                            <option value="0">类型1</option>
                            <option value="1">类型2</option>
                        </select>
                    </p>
                </td>
            </tr>
            <tr>
                <th class="label">类型值（同字段）</th>
                <td>
                    <p><input type="text" name="typeValue" placeholder=""/></p>
                </td>
            </tr>

            <tr class="limited type_0">
                <th class="label">类型1值（不同字段）</th>
                <td>
                    <p><input type="text" name="type0value" placeholder=""/></p>
                </td>
            </tr>
            <tr class="limited type_1">
                <th class="label">类型2值（不同字段）</th>
                <td>
                    <p><input type="text" name="type1value" placeholder=""/></p>
                </td>
            </tr>

           <tr>
                <th class="label">基础-数字</th>
                <td>
                    <p><input type="text" name="vnumber"/></p>
                </td>
            </tr>
<!--            text/int/number/email/tel/mobile/select/radio/checkbox-->
            <tr>
                <th class="label">基础-文本</th>
                <td>
                    <p><input type="text" name="vtext"/></p>
                </td>
            </tr>
            <tr>
                <th class="label">基础-整数</th>
                <td>
                    <p><input type="text" name="vint"/></p>
                </td>
            </tr>
            <tr>
                <th class="label">基础-邮箱</th>
                <td>
                    <p><input type="text" name="vemail"/></p>
                </td>
            </tr>
            <tr>
                <th class="label">基础-手机号</th>
                <td>
                    <p><input type="text" name="vmobile"/></p>
                </td>
            </tr>
            <tr>
                <th class="label">基础-电话号</th>
                <td>
                    <p><input type="text" name="vtel"/></p>
                </td>
            </tr>





            <tr>
                <th class="label">日期</th>
                <td>
                    <p><input class="ht-dateInput" type="date" name="authTime" placeholder=""/></p>
                </td>
            </tr>
            <tr>
                <th>日期关联</th>
                <td>
                    <!--<p><span class="mr-1">授权起始日</span><input disabled="disabled" class="ht-dateInput" type="date" name="authStartTime" placeholder="" data-options="endSelector:'[name=authEndTime]'" style="background-color: #eee; color:#999;" /></p>-->
                    <input class="ht-dateInput" type="date" name="authStartTime" placeholder="" data-options="endSelector:'[name=authEndTime]'" />-
                    <input class="ht-dateInput" type="date" name="authEndTime" placeholder="" data-options="startSelector:'[name=authStartTime]'"/>
                </td>
            </tr>

            <tr>
                <th class="label">整数</th>
                <td>
                    <p><input type="int" name="intNum" placeholder=""/></p>
                </td>
            </tr>

            <tr>
                <th class="label">整数组</th>
                <td>
                    <input type="int" name="intMin" size="10" value="" data-options="maxValue:10,maxSelector:'[name=intMax]'"/>
                    至
                    <input type="int" name="intMax" size="10" value="" data-options="minValue:1,minSelector:'[name=intMin]'"/>
                </td>
            </tr>

            <tr>
                <th class="label">数字</th>
                <td>
                    <p><input type="number" name="normalNum" placeholder=""/></p>
                </td>
            </tr>
            <tr>
                <th class="label">数字组</th>
                <td>
                    <input type="number" name="numMin" size="10" value="" data-options="maxValue:10,maxSelector:'[name=numMax]'"/>
                    至
                    <input type="number" name="numMax" size="10" value="" data-options="minValue:1,minSelector:'[name=numMin]'"/>
                </td>
            </tr>

            <tr>
                <th class="label">金额</th>
                <td><input type="amount" data-options="minValue:0" name="financeAmount" th:value="${dto.financeAmount}"/><span class="error"></span><span class="ml-1 tips">仅可以输入数和小数点，最多输入12位整数和2位小数</span></td>
            </tr>
            <tr>
                <th class="label">金额关联</th>
                <td>
                    <input type="amount" name="amountMin" data-options="maxValue:10,maxSelector:'[name=amountMax]'"/><span class="error"></span>
                    --
                    <input type="amount" name="amountMax" data-options="minValue:1,minSelector:'[name=amountMin]'"/><span class="error"></span>
                    <span class="ml-1 tips">仅可以输入数和小数点，最多输入12位整数和2位小数</span>
                </td>
            </tr>

            <tr>
                <th class="label">利率</th>
                <td>
                    <input type="rate" name="rate" size="10" value=""/>
                </td>
            </tr>

            <tr>
                <th class="label">手机号</th>
                <td><input type="mobile" name="contactMobile" maxlength="11" /><span class="error"></span><span class="ml-1 tips">仅业务变动提醒，短信服务免费</span></td>
            </tr>

            <tr>
                <th class="label">电话号</th>
                <td><input type="tel" name="contactTel" maxlength="20" /><span class="ml-1 tips">输入的固定号码不能超过20位</span></td>
            </tr>


            <tr>
                <th>文件上传</th>
                <td><textarea name="attachFileContent" class="limited" th:value="*{attachFileContent}"></textarea>
                    <script>
                        var options={
                            action:"/app/uploader2/upload",
                            type:".jpg,.jpeg,.png,.pdf,.rar,.zip",
                            ext:".jpg,.jpeg,.png,.pdf,.rar,.zip"
                        }
                        var uploader = new Uploader('[name=attachFileContent]', options)
                    </script></td>
            </tr>

            <tr>
                <th>备注</th>
                <td><textarea name="financeRemark" maxlength="500" ></textarea><span class="ml-1 tips">长度不能超过500位</span></td>
            </tr>

            <tr>
                <th class="label">单选组</th>
                <td>
                                <span role="RadioGroup">
                                    <input type="hidden" name="bField" value="3" role="RadioChecked" />
                                    <input type="radio" name="bField" value="1"/>
                                    <label>值一</label>
                                    <input type="radio" name="bField" value="2"/>
                                    <label>值二</label>
                                    <input type="radio" name="bField" value="3"/>
                                    <label>值三</label>
                                </span>
                </td>
            </tr>

            <tr>
                <th class="label">复选组</th>
                <td>
                                 <span role="CheckboxGroup">
                                    <input type="hidden" name="aField" value="1,3" role="CheckboxChecked" />
                                    <input type="checkbox" name="aField" value="1"/>
                                    <label>值一</label>
                                    <input type="checkbox" name="aField" value="2"/>
                                    <label>值一</label>
                                    <input type="checkbox" name="aField" value="3"/>
                                    <label>值三</label>
                                </span>
                </td>
            </tr>


            <tr>
                <th class="label">选择</th>
                <td>
                    <select name="cField">
                        <option value="{type}" selected role="OptionSelected"></option>
                        <option value="1">值一</option>
                        <option value="2">值二</option>
                        <option value="3">值三</option>
                    </select>
                </td>
            </tr>
            <tr>
                <th class="label">选择组</th>
                <td>
                    <div role="SelectGroup" data-options="url:'/app/base/area/',defaultText:'请选择'">
                        <select name="province1">
                            <option th:value="*{province}" class="selected" selected></option>
                        </select>
                        <select name="city1" style="width: auto">
                            <option th:value="*{city}" class="selected" selected></option>
                        </select>
                        <select name="county1" style="width: auto">
                            <option th:value="*{county}" class="selected" selected></option>
                        </select>
                        <span class="ml-1 tips">同一统筹区不支持向多家资金方提交融资申请11</span>
                    </div>

                </td>
            </tr>

            </tbody>
        </table>

        </div>
        <div class="row" style="padding-top: 20px">
            <input class="btn btn-primary btn-lg" type="submit" value="提 交" />
            <input class="btn btn-clear" type="clear" role="ClearButton" value="清空">
        </div>
    </form>

</div>
<div class="ht-dialog auto" role="autoOpenDialog">
    <div class="wrapper">
        <h4 class="title" th:text="${result.msg}">提示</h4>
        <a class="ht-closeButton">close</a>
        <div class="content">
            <ul th:if="${#fields.hasErrors('dto.*')}">
                <li th:each="err:${#fields.errors('dto.*')}" th:text="${err}"></li>
            </ul>
        </div>``
    </div>
</div>


<script>
    var ruleParser=new RuleParser("#form1");
    ruleParser.loadRule(baseUrl+"/demo/finance/createForm1Rule.json")
</script>
</body>
</html>